package structural.composite;

// 菜单项类
public class MenuItme extends MenuComponent{

    public MenuItme(String name, int level) {
        super(name, level);
    }

    @Override
    public void print() {
        for (int i = 1; i < level; i++) {
            System.out.print("--");
        }
        System.out.println(name);
    }
}
